import mockjs from "mockjs"

const { goods } = mockjs.mock({
    "goods|20": [
        {
            "id|+1": 104,
            "name": "@cword(2,5)"
        }
    ]
})

export default [
    {
        url: /\/goods/,
        method: /get/,
        response: function () {
            return {
                code: 0,
                msg: "获取商品列表成功",
                data: [
                    {
                        id: 101,
                        name: '奇妙发现'
                    },
                    {
                        id: 102,
                        name: '奇妙电路'
                    },
                    {
                        id: 103,
                        name: '七彩世界'
                    }
                ].concat(goods)
            }
        }
    }
]